package cn.tedu.order.feign;

import cn.tedu.pojo.param.CartAddParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import result.JsonResult;

@FeignClient("micro-service-cart") //nacos中对应的服务名称
public interface CartClient {
    //调用购物车的新增接口
    @PostMapping("/cart/add")
    JsonResult addCart(@RequestParam("productCode") String productCode,
                       @RequestParam("userId") String userId,
                       @RequestParam("price") Integer price,
                       @RequestParam("count") Integer count);

    //删除购物车的接口
    @PostMapping("/cart/delete")
    JsonResult deleteCart(@RequestParam("productCode") String productCode,
                          @RequestParam("userId") String userId);
}
